<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of charactor
 *
 * @author lz06
 */
class CharacterDb {

    private $dbc;

    function __construct(DBC $dbc) {
        $this->dbc = $dbc;
    }

    /**
     * 获得名称获得用户
     * @param type $name
     * @return type
     */
    public function getCharacterByName($name) {
        $sql = "SELECT * FROM TCharacter WHERE rtrim(CName) = '$name';";
        return $this->dbc->fetchData($sql);
    }

}
